package org.wappumobileapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.StrictMode;
import android.view.Window;

public class SplashScreen extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// Remove title bar
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
		StrictMode.setThreadPolicy(policy);
		
		setContentView(R.layout.splashscreen);

		Handler x = new Handler();
		x.postDelayed(new SplashScreenHandler(), 1000);
		/** Set time to splash out (milisecs) */
	}

	class SplashScreenHandler implements Runnable {
		public void run(){
			GetFromService.init();
			startActivity(new Intent(getApplication(), Main.class));
			SplashScreen.this.finish();
		}
	}
}